<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        body {
            background-image: url("img/4.jpg");
        }
        
        .abc {
            width: 1200px;
            margin: 0 auto;
        }
        
        li {
            float: left;
            list-style: none;
        }
        
        .abc ul li img {
            width: 400px;
        }
    </style>
</head>

<body>
    <div class="abc">
        <ul>
            <li><img src="img/2.jpg" alt=""></li>
            <li><img src="img/3.jpg" alt=""></li>
            <li><img src="img/4.jpg" alt=""></li>
        </ul>
    </div>
    <script src="jquery-1.11.1.min.js"></script>
    <script>
        $(function() {
            $(".abc ul li img").click(function() {
                var index = this.src;
                $("body").css({
                    "background-image": 'url(' + index + ')'
                })
            })
        })
    </script>

</body>

</html>